<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--<!DOCTYPE html>-->
<html xmlns:ng="http://angularjs.org" id="ng-app" ng-app="ubang">
<head>
    <!--[if lte IE 8]>
    <script>
        document.createElement('ng-include');
        document.createElement('ng-pluralize');
        document.createElement('ng-view');

        // Optionally these for CSS
        document.createElement('ng:include');
        document.createElement('ng:pluralize');
        document.createElement('ng:view');
    </script>
    <![endif]-->
    <title></title>
    <meta charset="utf-8">
    <link href="/res/plugin/bootstrap/css/bootstrap.css" rel="stylesheet">
    <link href="/res/plugin/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
    <link href="/ubang/res/css/main.css" rel="stylesheet">
    <script type="text/javascript" src="/res/plugin/jquery/jquery-1.10.1.js"></script>
    <script type="text/javascript" src="/res/plugin/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript" src="/res/plugin/underscore/underscore-min.js"></script>
    <script type="text/javascript" src="/res/plugin/angular/angular.min.js"></script>
    <script type="text/javascript" src="/res/js/i18n.js"></script>
    <script src="/res/plugin/json2.js" type="text/javascript"></script>
    <style>
        .table tr td {
            line-height: 35px;
            height: 35px;
        }

        tr td:nth-child(odd) {
            text-align: right;
        }

        td textarea {
            margin: auto;
        }

        .table label.radio {
            margin-right: 20px;
        }
    </style>
</head>
<body ng-controller="AllDocCrtl">
<div class="u_child_box">
    <div class="u_title_bar">
        <span id="device_info" class="u_title">{{title}}用户</span>
    </div>
    <form id="inputForm">
        <input type="hidden" id="cid" value="{{formData.id}}"/>
        <table class="table table-striped table-bordered table-condensed dataListTable">

            <tr class="hide">
                <td>所在机构</td>
                <td>
                    <a href="javascript:void(0)" class="btn btn-small" ng-click="selectGroup()"><i
                            class="icon-plus"></i>添加机构</a>

                    <div id="e_groups" style="margin:14px 0;clear: both"></div>
                </td>
            </tr>
            <tr class="hide">
                <td>角色</td>
                <td>

                    <label class="checkbox" ng-repeat="role in roleMap" style="margin-right: 10px;">
                        <input type="checkbox" value="{{role.id}}"
                               ng-click="selectRole($event,$parentIndex,$index)"
                               ng-checked="role.show_checked">
                        {{role.name}}
                    </label>
                </td>
            </tr>
            <tr>
                <td class="span2">账号</td>
                <td>
                    <input name="name" type="text" ng-model="formData.name">
                </td>
            </tr>
            <tr>
                <td>姓名</td>
                <td>
                    <input type="text" ng-model="formData.nickName">
                </td>
            </tr>

            <tr ng-hide="formData.id!=null">
                <td>密码</td>
                <td>
                    <input type="password" name="password" ng-model="formData.password">
                </td>
            </tr>
            <tr>
                <td>邮箱E-mail</td>
                <td>
                    <input type="text" ng-model="formData.email">
                </td>
            </tr>
            <tr class="hide">
                <td>禁用</td>
                <td>
                    <label class="radio">
                        <input type="radio" value="1" ng-model="formData.enable">
                        是
                    </label>
                    <label class="radio">
                        <input type="radio" value="0" ng-model="formData.enable">
                        否
                    </label>
                </td>
            </tr>
            <tr>
                <td>备注</td>
                <td>
                    <textarea class="span6" rows="4" ng-model="formData.description"></textarea>
                </td>
            </tr>
            <tr>
                <td id="errorPlace" colspan="4"></td>
            </tr>
        </table>
    </form>
    <div class="footer_bar" style="text-align: center;">
        <button class="btn u_c_btn" ng-click="submit()">提 交</button>
        <button class="btn u_c_btn" ng-show="formData.id" ng-click="back()">返 回</button>
    </div>
</div>
<script src="/res/js/common.js" type="text/javascript"></script>
<script src="/isys/res/js/i_common.js" type="text/javascript"></script>
<script src="/res/plugin/jquery-validation-1.11.1/jquery.validate.min.js"></script>
<script src="/res/plugin/jquery-validation-1.11.1/additional-methods.min.js"></script>
<script src="./edit.js" type="text/javascript"></script>

</body>
</html>